<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="created" content="2020-01-10T06:18:10.521000000">
    <meta name="changed" content="2020-01-10T07:26:01.212000000">
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta http-equiv="Content-Language" content="en">
    <title>
      v2.0 raw
    </title>
    <link rel="stylesheet" type="text/css" href="../../style.css">
  </head>
  <body>
    <h1>
      v2.0 raw
    </h1>
    <div class="maindiv">
      <p>
        The file format used for image files is intentionally simple; this permits you to write a program, such as an assembler, that generates memory images that can then be loaded. For example if we had a memory as below:
      </p>
      <p align="center">
        <img class="notscal" src="../../../../img-guide/memraw.png" alt="#########">
      </p>
      <p>
        and then all the values are at zero and the resultant file will be the following.
      </p>
      <blockquote>
        <pre>v2.0 raw
12 22 45 67 12*80  23 a2 bb
ce 4f 6a cc 45 7*cc 12 24</pre>
      </blockquote>
      <p>
        The first line identifies the file format used (currently, there is only one file format recognized "raw"). Subsequent values list the values in hexadecimal, starting from address 0; you can place several such values on the same line. If the data dimension of the file is smaller than the space in memory the remaining cells will not be changed.
      </p>
      <p>
        The image file can use run-length encoding; for example, rather than list the value <tt>80</tt> twelve times in a row, the file can include <tt>12*80</tt>. Notice than the number of repetitions is written in base 10. Files produced by Logisim will use run-length encoding for runs of at least four values.
      </p>
      <p>
        You can place comments into the file by using the '#' symbol. All characters in the line from the '#' symbol will be ignored by Logisim.
      </p>
      <p>
        If the length of the data set in the file is shorter than the memory space the remaining cells will be initialized to 0 for ROM and RAM according to the parameters in <a href="../opts/index.html">Project options</a>, to 0 or randomly.
      </p>
      <p>
        If the width of the memory word in bits is smaller than the width of the data words in the file. Excessively large bits will be ignored.
      </p>
      <p align="center">nter>
        <img src="../../../../img-guide/memraw1.png" alt="#########" width="480&quot;" height="130">
      </p>
	  <strong>Next:</strong> <a href="mem-menu.html">Pop-up menus and files</a>.
    </div>
  </body>
</html>
